import request from '@/utils/request'



//回去后台管理人员，非超管
export function getSystemAdminList() {
  return request({
    url: '/payment/getSystemAdminList',
    method: 'get'
  })
}

//设置订单催收人员
export function setOrderCollectionMember(order_id,data) {
  return request({
    url: '/payment/setOrderCollectionMember/'+order_id,
    method: 'post',
    data
  })
}
//历史逾期
export function getOrderHistoryPaymentOverList(data) {
  return request({
    url: 'backend_history_overdue',
    method: 'post',
    data
  })
}
/**
 * @param {Object} order_id
 */
export function getOrderPaymentList(order_id) {
  return request({
    url: '/payment/getOrderPaymentList/'+ order_id,
    method: 'get'
  })
}

export function getOrderPaymentMerchantList(order_id) {
  return request({
    url: '/payment/getOrderPaymentMerchantList/'+ order_id,
    method: 'get'
  })
}
// 获取订单
export function getOrderPaymentNormalList(query) {
  return request({
    url: 'backend_collect_normal',
    method: 'get',
    params: query
  })
}
export function getOrderPaymentOverList(query) {
  return request({
    url: 'backend_collect_over_list',
    method: 'get',
    params: query
  })
}
export function setCollectionMember(pay_id,data) {
  return request({
    url: '/payment/setCollectionMember/'+pay_id,
    method: 'post',
    data
  })
}
export function setCollectionMerchant(pay_id,data) {
  return request({
    url: '/payment/setCollectionMerchant/'+pay_id,
    method: 'post',
    data
  })
}
// 订单详情，包括订单记录
export function fetchOrderCollectionDetail(order_id,pay_id) {
  return request({
    url: '/order/getOrderCollectionDetail/' + order_id + '/' +pay_id,
    method: 'get'
  })
}
export function submitCollectionRecord(data) {
  return request({
    url: '/payment/submitCollectionRecord',
    method: 'post',
    data
  })
}
//提醒
export function sendTipsByAdmin(data) {
  return request({
    url: 'send_wx_tips_by_admin',
    //url: 'http://192.168.31.49:90/send_wx_tips_by_admin',
    method: 'post',
    data
  })
}
//分配
export function transferToAdmin(data) {
  return request({
    url: 'backend_collect_overdue_collecter_transfer',
    method: 'post',
    data
  })
}
//列表
export function collectorManager(data) {
  return request({
    url: 'backend_collect_overdue_collecter',
    method: 'post',
    data
  })
}
//催收方式和结果
export function getCollectWay() {
  return request({
    url: 'backend_collect_way',
    method: 'get'
  })
}
//催收记录添加
export function collectRecordAdd(data) {
  return request({
    url: 'backend_collect_record_add',
    method: 'post',
    data
  })
}
//催收记录添加更多
export function deleteCollectRecord(data) {
  return request({
    url: 'backe_this_order_collect_delete',
    method: 'post',
    data
  })
}
//催收记录
export function getCollectRecord(data) {
  return request({
    url: 'backend_getCollectRecord',
    method: 'post',
    data
  })
}
//标记起诉
export function tagProsecution(data) {
  return request({
    url: '/payment/tagProsecution',
    method: 'post',
    data
  })
}

export function overdueExcelout(data) {
  return request({
    url: 'excel_overdue_order',
    method: 'post',
    data
  })
}
